{
  "cells": [
    {
      "cell_type": "markdown",
      "source": [
        "# Multiple Linear Regression"
      ],
      "metadata": {}
    },
    {
      "cell_type": "markdown",
      "source": [
        "Multiple Linear Regression (MLR) is used for more than 1 variables or features to find the relationship by fitting a linear equation.   \n",
        "\n",
        "Y: 1 continuous target variable     \n",
        "X: 2 or more predictor variables        \n",
        "b0: intercept (X=0)     \n",
        "b1: the coefficient or parameter of x1   \n",
        "b2: the coefficient of parameter x2 and so on...        \n",
        "\n",
        "\n",
        "To find the the parameter or coefficients for multiple linear regression with very large dataset and high dimensionality., you should use optimization approach ."
      ],
      "metadata": {}
    },
    {
      "cell_type": "markdown",
      "source": [
        "Step 1: Data Preprocessing"
      ],
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "# Importing the libraries\n",
        "import pandas as pd\n",
        "import numpy as np\n",
        "import matplotlib.pyplot as plt\n",
        "\n",
        "import warnings\n",
        "warnings.filterwarnings(\"ignore\")\n",
        "\n",
        "# fix_yahoo_finance is used to fetch data \n",
        "import fix_yahoo_finance as yf\n",
        "yf.pdr_override()"
      ],
      "outputs": [],
      "execution_count": 1,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# input\n",
        "symbol = 'AMD'\n",
        "start = '2014-01-01'\n",
        "end = '2018-08-27'\n",
        "\n",
        "# Read data \n",
        "dataset = yf.download(symbol,start,end)\n",
        "\n",
        "# View columns \n",
        "dataset.head()"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "[*********************100%***********************]  1 of 1 downloaded\n"
          ]
        },
        {
          "output_type": "execute_result",
          "execution_count": 2,
          "data": {
            "text/plain": [
              "            Open  High   Low  Close  Adj Close    Volume\n",
              "Date                                                    \n",
              "2014-01-02  3.85  3.98  3.84   3.95       3.95  20548400\n",
              "2014-01-03  3.98  4.00  3.88   4.00       4.00  22887200\n",
              "2014-01-06  4.01  4.18  3.99   4.13       4.13  42398300\n",
              "2014-01-07  4.19  4.25  4.11   4.18       4.18  42932100\n",
              "2014-01-08  4.23  4.26  4.14   4.18       4.18  30678700"
            ],
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Open</th>\n",
              "      <th>High</th>\n",
              "      <th>Low</th>\n",
              "      <th>Close</th>\n",
              "      <th>Adj Close</th>\n",
              "      <th>Volume</th>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Date</th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>2014-01-02</th>\n",
              "      <td>3.85</td>\n",
              "      <td>3.98</td>\n",
              "      <td>3.84</td>\n",
              "      <td>3.95</td>\n",
              "      <td>3.95</td>\n",
              "      <td>20548400</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2014-01-03</th>\n",
              "      <td>3.98</td>\n",
              "      <td>4.00</td>\n",
              "      <td>3.88</td>\n",
              "      <td>4.00</td>\n",
              "      <td>4.00</td>\n",
              "      <td>22887200</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2014-01-06</th>\n",
              "      <td>4.01</td>\n",
              "      <td>4.18</td>\n",
              "      <td>3.99</td>\n",
              "      <td>4.13</td>\n",
              "      <td>4.13</td>\n",
              "      <td>42398300</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2014-01-07</th>\n",
              "      <td>4.19</td>\n",
              "      <td>4.25</td>\n",
              "      <td>4.11</td>\n",
              "      <td>4.18</td>\n",
              "      <td>4.18</td>\n",
              "      <td>42932100</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2014-01-08</th>\n",
              "      <td>4.23</td>\n",
              "      <td>4.26</td>\n",
              "      <td>4.14</td>\n",
              "      <td>4.18</td>\n",
              "      <td>4.18</td>\n",
              "      <td>30678700</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 2,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "X = dataset.iloc[ : , 0:4].values\n",
        "Y = dataset.iloc[ : ,  4].values"
      ],
      "outputs": [],
      "execution_count": 3,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# Encoding Categorical data\n",
        "from sklearn.preprocessing import LabelEncoder, OneHotEncoder\n",
        "labelencoder = LabelEncoder()\n",
        "X[: , 3] = labelencoder.fit_transform(X[ : , 3])\n",
        "onehotencoder = OneHotEncoder(categorical_features = [3])\n",
        "X = onehotencoder.fit_transform(X).toarray()"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "C:\\Users\\Tin Hang\\Anaconda3\\envs\\py35\\lib\\site-packages\\sklearn\\preprocessing\\_encoders.py:385: DeprecationWarning: The 'categorical_features' keyword is deprecated in version 0.20 and will be removed in 0.22. You can use the ColumnTransformer instead.\n",
            "  \"use the ColumnTransformer instead.\", DeprecationWarning)\n"
          ]
        }
      ],
      "execution_count": 4,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# Acoiding Dummy Variable Trap\n",
        "X = X[: , 1:]"
      ],
      "outputs": [],
      "execution_count": 5,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# Splitting the dataset into the Training set and Test set\n",
        "from sklearn.model_selection import train_test_split\n",
        "X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size = 0.2, random_state = 0)"
      ],
      "outputs": [],
      "execution_count": 6,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "Step 2: Fitting Multiple Linear Regression to the Training set"
      ],
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "from sklearn.linear_model import LinearRegression\n",
        "regressor = LinearRegression()\n",
        "regressor.fit(X_train, Y_train)"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 7,
          "data": {
            "text/plain": [
              "LinearRegression(copy_X=True, fit_intercept=True, n_jobs=None,\n",
              "         normalize=False)"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 7,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "Step 3: Predicting the Test set results"
      ],
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "y_pred = regressor.predict(X_test)\n",
        "y_pred.shape"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 8,
          "data": {
            "text/plain": [
              "(235,)"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 8,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "Y_test.shape"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 9,
          "data": {
            "text/plain": [
              "(235,)"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 9,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "Y_test.shape"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 10,
          "data": {
            "text/plain": [
              "(235,)"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 10,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "print('Multiple Linear Coefficients:', regressor.coef_)\n",
        "print('Multiple Linear Intercept:', regressor.intercept_)\n",
        "print('Multiple Linear Score:', regressor.score(X_test, Y_test))"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Multiple Linear Coefficients: [  4.00000000e-02   5.00000000e-02   8.00000000e-02   9.00000000e-02\n",
            "   1.00000000e-01   1.10000000e-01   4.78364709e-02  -9.23875088e-03\n",
            "   1.40000000e-01   1.50000000e-01   1.60000000e-01   1.70000000e-01\n",
            "   1.80000000e-01   1.90000000e-01   2.00000000e-01   2.10000000e-01\n",
            "   2.20000000e-01   2.30000000e-01   2.40000000e-01   2.50000000e-01\n",
            "   2.60000000e-01   2.70000000e-01   2.80000000e-01   2.90000000e-01\n",
            "   3.00000000e-01   3.10000000e-01   3.20000000e-01   3.30000000e-01\n",
            "   3.40000000e-01   3.50000000e-01   3.60000000e-01   3.70000000e-01\n",
            "   3.80000000e-01   3.90000000e-01   4.00000000e-01   4.10000000e-01\n",
            "   4.30000000e-01   4.50000000e-01   4.60000000e-01   4.70000000e-01\n",
            "   4.80000000e-01   4.90000000e-01   5.00000000e-01   5.10000000e-01\n",
            "   5.20000000e-01   1.09728445e-02   5.40000000e-01   5.60000000e-01\n",
            "   5.70000000e-01   5.80000000e-01   5.90000000e-01   6.00000000e-01\n",
            "   6.10000000e-01   1.71066983e-10   6.30000000e-01   6.40000000e-01\n",
            "   6.50000000e-01   6.60000000e-01   6.70000000e-01   6.80000000e-01\n",
            "   6.90000000e-01   7.00000000e-01   7.10000000e-01   7.20000000e-01\n",
            "   7.30000000e-01   7.40000000e-01   7.50000000e-01   7.60000000e-01\n",
            "   7.70000000e-01   7.80000000e-01   8.00000000e-01   8.30000000e-01\n",
            "   8.40000000e-01   8.50000000e-01   8.60000000e-01   8.70000000e-01\n",
            "   8.80000000e-01  -7.76462228e-15   9.00000000e-01   9.10000000e-01\n",
            "   9.20000000e-01   9.30000000e-01   3.41367559e-14   9.50000000e-01\n",
            "   9.60000000e-01   9.70000000e-01   9.90000000e-01   1.00000000e+00\n",
            "   1.01000000e+00   1.02000000e+00   1.03000000e+00   1.04000000e+00\n",
            "   1.05000000e+00   1.06000000e+00   1.07000000e+00   1.08000000e+00\n",
            "   1.09000000e+00   1.10000000e+00   1.11000000e+00   1.12000000e+00\n",
            "   1.13000000e+00   1.14000000e+00   1.15000000e+00   1.16000000e+00\n",
            "   1.17000000e+00   1.18000000e+00   1.19000000e+00   1.21000000e+00\n",
            "   1.22000000e+00   1.23000000e+00   1.24000000e+00   1.25000000e+00\n",
            "   1.30000000e+00   1.31000000e+00   1.33000000e+00   1.36000000e+00\n",
            "   9.71445147e-17   1.41000000e+00   1.42000000e+00   1.43000000e+00\n",
            "   1.44000000e+00   1.45000000e+00   1.46000000e+00   1.48000000e+00\n",
            "   1.49000000e+00   1.50000000e+00   1.52000000e+00   1.53000000e+00\n",
            "   1.59000000e+00   1.66000000e+00   1.69000000e+00   1.71000000e+00\n",
            "   1.73000000e+00   1.74000000e+00   1.75000000e+00   1.77000000e+00\n",
            "   1.78000000e+00   1.79000000e+00   1.81000000e+00  -9.36750677e-17\n",
            "   1.85000000e+00   1.86000000e+00   1.92000000e+00   1.93000000e+00\n",
            "   1.97000000e+00   1.98000000e+00   1.99000000e+00   1.11022302e-16\n",
            "   2.01000000e+00  -2.77555756e-17   2.03000000e+00   2.04000000e+00\n",
            "   2.05000000e+00   2.06000000e+00   2.07000000e+00   2.08000000e+00\n",
            "   2.09000000e+00   2.10000000e+00   2.11000000e+00   2.12000000e+00\n",
            "   2.14000000e+00   2.15000000e+00   2.16000000e+00   2.17000000e+00\n",
            "   2.18000000e+00   2.19000000e+00   2.20000000e+00   2.21000000e+00\n",
            "   2.22000000e+00   2.23000000e+00   2.24000000e+00   2.25000000e+00\n",
            "   2.26000000e+00   2.27000000e+00   2.29000000e+00   2.31000000e+00\n",
            "   2.32000000e+00   2.33000000e+00   2.34000000e+00   2.35000000e+00\n",
            "   2.36000000e+00   2.37000000e+00   2.38000000e+00   2.39000000e+00\n",
            "   2.40000000e+00   2.41000000e+00   2.42000000e+00   2.43000000e+00\n",
            "   2.44000000e+00   2.45000000e+00   2.46000000e+00   2.47000000e+00\n",
            "   2.48000000e+00   2.49000000e+00   2.50000000e+00   2.51000000e+00\n",
            "   2.52000000e+00   2.53000000e+00   2.54000000e+00   2.55000000e+00\n",
            "   2.56000000e+00   2.57000000e+00   2.58000000e+00   2.59000000e+00\n",
            "   2.60000000e+00   2.61000000e+00   2.62000000e+00   2.63000000e+00\n",
            "   2.64000000e+00   2.65000000e+00   2.66000000e+00   2.67000000e+00\n",
            "  -1.56125113e-17   2.70000000e+00   2.72000000e+00   2.73000000e+00\n",
            "   2.74000000e+00   2.75000000e+00  -1.66533454e-16   2.77000000e+00\n",
            "   2.78000000e+00   2.80000000e+00   2.81000000e+00   2.82000000e+00\n",
            "   2.84000000e+00   2.85000000e+00   2.89000000e+00   2.90000000e+00\n",
            "   2.91000000e+00   2.95000000e+00   2.98000000e+00   3.02000000e+00\n",
            "   3.04000000e+00   3.10000000e+00   3.13000000e+00   3.26000000e+00\n",
            "   3.34000000e+00   3.39000000e+00   3.40000000e+00   3.42000000e+00\n",
            "   6.24500451e-17   3.47000000e+00   3.48000000e+00   3.50000000e+00\n",
            "   3.51000000e+00   3.52000000e+00   3.55000000e+00   3.59000000e+00\n",
            "  -6.93889390e-16  -1.40165657e-15   3.79000000e+00  -2.14411822e-15\n",
            "   3.89000000e+00   4.12000000e+00   4.22000000e+00   4.28000000e+00\n",
            "  -4.10153682e-16   2.77555756e-16   4.42000000e+00   8.32667268e-17\n",
            "   4.54000000e+00   4.55000000e+00   4.61000000e+00   4.64000000e+00\n",
            "   9.71445147e-17   4.68000000e+00  -1.97758476e-16   4.85722573e-17\n",
            "  -8.32667268e-17   4.87000000e+00   4.88000000e+00   4.90000000e+00\n",
            "   4.92000000e+00   4.93000000e+00   4.94000000e+00   4.96000000e+00\n",
            "  -8.67361738e-19   4.98000000e+00   4.99000000e+00   5.00000000e+00\n",
            "   0.00000000e+00   5.05000000e+00   5.06000000e+00   5.07000000e+00\n",
            "   5.08000000e+00   5.11000000e+00   5.13000000e+00   5.14000000e+00\n",
            "   5.15000000e+00   5.16000000e+00   5.17000000e+00   5.20000000e+00\n",
            "   5.22000000e+00   5.23000000e+00   5.24000000e+00   5.29000000e+00\n",
            "   5.32000000e+00   5.33000000e+00   5.34000000e+00   5.35000000e+00\n",
            "   5.36000000e+00   5.38000000e+00   5.39000000e+00   5.42000000e+00\n",
            "   5.47000000e+00   3.78169718e-16   5.58000000e+00   1.38777878e-16\n",
            "   5.67000000e+00  -1.31838984e-16   5.73000000e+00   2.75174747e-16\n",
            "   5.81000000e+00   5.85000000e+00   5.87000000e+00   5.88000000e+00\n",
            "   5.89000000e+00   5.96000000e+00   5.97000000e+00   6.00000000e+00\n",
            "   6.05000000e+00   6.77000000e+00   6.84000000e+00   6.91000000e+00\n",
            "   2.77555756e-17   7.07000000e+00   7.09000000e+00   7.15000000e+00\n",
            "   7.18000000e+00   7.21000000e+00   7.29000000e+00   7.31000000e+00\n",
            "   7.32000000e+00   7.83000000e+00   7.91000000e+00   6.10622664e-16\n",
            "   7.94000000e+00   7.99000000e+00   1.42247325e-16   8.13000000e+00\n",
            "   8.15000000e+00   8.19000000e+00   8.20000000e+00   1.47451495e-16\n",
            "   2.08166817e-16   8.29000000e+00   8.31000000e+00   8.32000000e+00\n",
            "   8.36000000e+00   8.37000000e+00   8.38000000e+00   8.40000000e+00\n",
            "   8.41000000e+00   8.42000000e+00   8.43000000e+00   1.63064007e-16\n",
            "   8.47000000e+00   8.48000000e+00   8.49000000e+00   8.51000000e+00\n",
            "  -2.77555756e-17   8.56000000e+00   8.57000000e+00   8.66000000e+00\n",
            "   8.67000000e+00   1.66533454e-16   8.72000000e+00   8.73000000e+00\n",
            "   5.55111512e-17   4.47558657e-16   8.77000000e+00   8.82000000e+00\n",
            "  -2.49800181e-16   8.90000000e+00   8.91000000e+00   8.92000000e+00\n",
            "   8.93000000e+00   8.96000000e+00   8.99000000e+00   9.01000000e+00\n",
            "   9.04000000e+00   9.05000000e+00   9.06000000e+00   9.11000000e+00\n",
            "   9.14000000e+00  -1.27675648e-15   9.18000000e+00  -7.63278329e-17\n",
            "  -5.55111512e-17   9.24000000e+00   9.26000000e+00   9.27000000e+00\n",
            "   9.28000000e+00   9.29000000e+00   9.31000000e+00   9.33000000e+00\n",
            "   9.35000000e+00   9.36000000e+00   9.37000000e+00   9.38000000e+00\n",
            "   9.42000000e+00   9.45000000e+00   1.11022302e-16   9.49000000e+00\n",
            "   9.50000000e+00   9.51000000e+00   9.55000000e+00   9.57000000e+00\n",
            "   9.58000000e+00   9.60000000e+00   9.62000000e+00   9.63000000e+00\n",
            "   9.64000000e+00   9.66000000e+00   9.69000000e+00  -1.16573418e-15\n",
            "   9.72000000e+00   9.74000000e+00   9.75000000e+00   9.76000000e+00\n",
            "   9.78000000e+00   9.79000000e+00   9.80000000e+00   9.81000000e+00\n",
            "   9.82000000e+00   9.84000000e+00   9.85000000e+00   9.87000000e+00\n",
            "   7.70217223e-16   9.89000000e+00   9.90000000e+00   9.93000000e+00\n",
            "   2.10942375e-15   5.55111512e-17   9.97000000e+00   9.98000000e+00\n",
            "   9.99000000e+00   1.00200000e+01   1.00300000e+01  -2.15105711e-15\n",
            "   1.00800000e+01   1.00900000e+01   1.01000000e+01   1.01400000e+01\n",
            "   1.01500000e+01   1.01600000e+01   1.01900000e+01   1.02000000e+01\n",
            "   1.02200000e+01   1.02600000e+01   1.02800000e+01   1.02900000e+01\n",
            "   1.03100000e+01   1.03300000e+01   1.28716482e-15   1.03500000e+01\n",
            "   1.03900000e+01   1.04000000e+01   1.04100000e+01   1.04300000e+01\n",
            "   1.04400000e+01   1.04500000e+01   1.04700000e+01   1.04900000e+01\n",
            "   1.05000000e+01   1.05100000e+01   1.05200000e+01   1.05300000e+01\n",
            "   3.52495810e-15   1.05600000e+01  -8.32667268e-17   1.05800000e+01\n",
            "   1.06000000e+01   1.06100000e+01   1.06200000e+01   1.06300000e+01\n",
            "  -1.66533454e-15   1.06600000e+01   1.06800000e+01  -3.46944695e-17\n",
            "  -1.70002901e-16   1.07200000e+01   1.07500000e+01  -1.66533454e-16\n",
            "   1.07900000e+01   1.08000000e+01   1.08100000e+01   1.08300000e+01\n",
            "   1.08500000e+01   1.08600000e+01   0.00000000e+00   0.00000000e+00\n",
            "   1.23599048e-17   1.09300000e+01   1.09700000e+01   6.46184495e-17\n",
            "   1.09900000e+01   1.10100000e+01   1.10200000e+01   1.10300000e+01\n",
            "   2.91433544e-16   1.10900000e+01   1.11200000e+01   1.11300000e+01\n",
            "   1.11400000e+01   1.11700000e+01   1.12000000e+01  -5.27355937e-16\n",
            "   1.12200000e+01   4.15639745e-15  -6.86950496e-16   1.12800000e+01\n",
            "   1.13000000e+01   8.32667268e-17   3.81639165e-16  -1.19804340e-16\n",
            "   1.13600000e+01  -2.63677968e-16   1.13800000e+01   1.14000000e+01\n",
            "   1.14100000e+01   1.14200000e+01   1.14300000e+01   1.14600000e+01\n",
            "   1.14800000e+01   1.14900000e+01   1.15000000e+01   1.15100000e+01\n",
            "   1.15700000e+01   1.16000000e+01   1.16100000e+01   1.16200000e+01\n",
            "  -3.21964677e-15  -6.93889390e-17   1.16500000e+01   1.16700000e+01\n",
            "   1.16800000e+01   1.16900000e+01   1.17000000e+01   4.99600361e-15\n",
            "   1.17200000e+01   1.17400000e+01   1.17500000e+01   1.17800000e+01\n",
            "   1.17900000e+01   1.18000000e+01   1.18100000e+01   1.18500000e+01\n",
            "   1.18600000e+01   1.18700000e+01   1.19000000e+01   1.19100000e+01\n",
            "   4.88498131e-15  -2.77555756e-17   1.19400000e+01   1.19600000e+01\n",
            "   1.19900000e+01   1.20000000e+01   1.20100000e+01   1.20300000e+01\n",
            "   1.20700000e+01   1.20800000e+01   1.20900000e+01   2.56739074e-15\n",
            "   1.21200000e+01   1.21700000e+01   1.21800000e+01   1.21900000e+01\n",
            "   1.22000000e+01   1.22600000e+01   1.22700000e+01  -1.77635684e-15\n",
            "   1.22900000e+01   1.23000000e+01   1.23300000e+01   1.23600000e+01\n",
            "   1.23800000e+01   1.24300000e+01   1.24500000e+01   1.24600000e+01\n",
            "   1.24800000e+01   1.24900000e+01   1.25000000e+01   1.25400000e+01\n",
            "   1.25500000e+01   1.25800000e+01   1.26000000e+01   1.26300000e+01\n",
            "   1.26400000e+01   1.26600000e+01   1.26700000e+01   1.27000000e+01\n",
            "   1.27600000e+01   1.27800000e+01   1.28400000e+01   1.29300000e+01\n",
            "   1.30200000e+01   1.31400000e+01   1.32300000e+01   7.19563298e-15\n",
            "  -1.16573418e-15   1.33500000e+01   1.33700000e+01   1.33800000e+01\n",
            "   1.34900000e+01   1.35400000e+01   1.35800000e+01   1.36300000e+01\n",
            "   1.36900000e+01   1.38800000e+01   1.40300000e+01   1.40500000e+01\n",
            "   1.41100000e+01  -2.71657696e-15   1.66533454e-16   1.44299990e+01\n",
            "   1.45700010e+01   1.46300000e+01   1.46500000e+01   1.47000000e+01\n",
            "   1.47200000e+01   1.47400010e+01   1.48800000e+01   1.49000000e+01\n",
            "   2.12330153e-15   1.49399990e+01   1.49600000e+01   1.49900010e+01\n",
            "   4.20843915e-15   1.50700010e+01   2.43121495e-15   1.52300000e+01\n",
            "   1.52500010e+01   1.73472348e-17   1.67100000e+01   1.67300000e+01\n",
            "   1.68600000e+01  -5.55111512e-17   1.71700010e+01   1.73200010e+01\n",
            "   1.74399990e+01   1.74800000e+01   1.77100000e+01   1.78000000e+01\n",
            "   1.78100000e+01   1.79399990e+01   1.79600000e+01   1.80800010e+01\n",
            "   1.81100000e+01   1.81500000e+01   1.11022302e-15   1.84000000e+01\n",
            "   1.87800000e+01   1.92800000e+01   2.06700010e+01   2.23600000e+01\n",
            "   2.36400000e+01  -1.66533454e-16   1.08801856e-14  -3.21964677e-15]\n",
            "Multiple Linear Intercept: 1.62\n",
            "Multiple Linear Score: -0.454451340198\n"
          ]
        }
      ],
      "execution_count": 11,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "import statsmodels.api as sm\n",
        "\n",
        "# with statsmodels\n",
        "X = sm.add_constant(X) # adding a constant\n",
        " \n",
        "model = sm.OLS(Y, X).fit()\n",
        "predictions = model.predict(X) \n",
        " \n",
        "print_model = model.summary()\n",
        "print(print_model)"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "                            OLS Regression Results                            \n",
            "==============================================================================\n",
            "Dep. Variable:                      y   R-squared:                       1.000\n",
            "Model:                            OLS   Adj. R-squared:                  1.000\n",
            "Method:                 Least Squares   F-statistic:                 1.310e+28\n",
            "Date:                Wed, 21 Aug 2019   Prob (F-statistic):               0.00\n",
            "Time:                        08:34:06   Log-Likelihood:                 34567.\n",
            "No. Observations:                1172   AIC:                        -6.781e+04\n",
            "Df Residuals:                     511   BIC:                        -6.446e+04\n",
            "Df Model:                         660                                         \n",
            "Covariance Type:            nonrobust                                         \n",
            "==============================================================================\n",
            "                 coef    std err          t      P>|t|      [0.025      0.975]\n",
            "------------------------------------------------------------------------------\n",
            "const          1.6200   8.69e-14   1.86e+13      0.000       1.620       1.620\n",
            "x1             0.0400   6.97e-14   5.74e+11      0.000       0.040       0.040\n",
            "x2             0.0500   6.97e-14   7.18e+11      0.000       0.050       0.050\n",
            "x3             0.0800   6.97e-14   1.15e+12      0.000       0.080       0.080\n",
            "x4             0.0900   6.97e-14   1.29e+12      0.000       0.090       0.090\n",
            "x5             0.1000   6.57e-14   1.52e+12      0.000       0.100       0.100\n",
            "x6             0.1100   8.06e-14   1.36e+12      0.000       0.110       0.110\n",
            "x7             0.1200   8.05e-14   1.49e+12      0.000       0.120       0.120\n",
            "x8             0.1300   8.06e-14   1.61e+12      0.000       0.130       0.130\n",
            "x9             0.1400   8.06e-14   1.74e+12      0.000       0.140       0.140\n",
            "x10            0.1500   6.98e-14   2.15e+12      0.000       0.150       0.150\n",
            "x11            0.1600   6.99e-14   2.29e+12      0.000       0.160       0.160\n",
            "x12            0.1700   6.39e-14   2.66e+12      0.000       0.170       0.170\n",
            "x13            0.1800   6.12e-14   2.94e+12      0.000       0.180       0.180\n",
            "x14            0.1900   7.01e-14   2.71e+12      0.000       0.190       0.190\n",
            "x15            0.2000   7.01e-14   2.85e+12      0.000       0.200       0.200\n",
            "x16            0.2100    6.4e-14   3.28e+12      0.000       0.210       0.210\n",
            "x17            0.2200   6.62e-14   3.32e+12      0.000       0.220       0.220\n",
            "x18            0.2300   7.02e-14   3.27e+12      0.000       0.230       0.230\n",
            "x19            0.2400   6.63e-14   3.62e+12      0.000       0.240       0.240\n",
            "x20            0.2500   6.64e-14   3.76e+12      0.000       0.250       0.250\n",
            "x21            0.2600   8.09e-14   3.21e+12      0.000       0.260       0.260\n",
            "x22            0.2700   7.04e-14   3.84e+12      0.000       0.270       0.270\n",
            "x23            0.2800   6.45e-14   4.34e+12      0.000       0.280       0.280\n",
            "x24            0.2900   7.04e-14   4.12e+12      0.000       0.290       0.290\n",
            "x25            0.3000   8.12e-14    3.7e+12      0.000       0.300       0.300\n",
            "x26            0.3100   6.33e-14    4.9e+12      0.000       0.310       0.310\n",
            "x27            0.3200   8.12e-14   3.94e+12      0.000       0.320       0.320\n",
            "x28            0.3300   7.08e-14   4.66e+12      0.000       0.330       0.330\n",
            "x29            0.3400   6.36e-14   5.35e+12      0.000       0.340       0.340\n",
            "x30            0.3500   7.12e-14   4.92e+12      0.000       0.350       0.350\n",
            "x31            0.3600   6.71e-14   5.36e+12      0.000       0.360       0.360\n",
            "x32            0.3700   6.71e-14   5.51e+12      0.000       0.370       0.370\n",
            "x33            0.3800   8.19e-14   4.64e+12      0.000       0.380       0.380\n",
            "x34            0.3900   6.53e-14   5.98e+12      0.000       0.390       0.390\n",
            "x35            0.4000   6.53e-14   6.12e+12      0.000       0.400       0.400\n",
            "x36            0.4100   7.13e-14   5.75e+12      0.000       0.410       0.410\n",
            "x37            0.4300   8.17e-14   5.26e+12      0.000       0.430       0.430\n",
            "x38            0.4500   6.56e-14   6.86e+12      0.000       0.450       0.450\n",
            "x39            0.4600   8.24e-14   5.58e+12      0.000       0.460       0.460\n",
            "x40            0.4700   6.62e-14    7.1e+12      0.000       0.470       0.470\n",
            "x41            0.4800   8.24e-14   5.83e+12      0.000       0.480       0.480\n",
            "x42            0.4900   7.23e-14   6.78e+12      0.000       0.490       0.490\n",
            "x43            0.5000   6.83e-14   7.32e+12      0.000       0.500       0.500\n",
            "x44            0.5100   6.84e-14   7.46e+12      0.000       0.510       0.510\n",
            "x45            0.5200   6.55e-14   7.94e+12      0.000       0.520       0.520\n",
            "x46            0.5300   6.86e-14   7.72e+12      0.000       0.530       0.530\n",
            "x47            0.5400   8.32e-14   6.49e+12      0.000       0.540       0.540\n",
            "x48            0.5600   7.27e-14    7.7e+12      0.000       0.560       0.560\n",
            "x49            0.5700    8.3e-14   6.87e+12      0.000       0.570       0.570\n",
            "x50            0.5800    6.7e-14   8.66e+12      0.000       0.580       0.580\n",
            "x51            0.5900   7.34e-14   8.03e+12      0.000       0.590       0.590\n",
            "x52            0.6000   6.96e-14   8.63e+12      0.000       0.600       0.600\n",
            "x53            0.6100   8.41e-14   7.26e+12      0.000       0.610       0.610\n",
            "x54            0.6200   8.42e-14   7.36e+12      0.000       0.620       0.620\n",
            "x55            0.6300   7.41e-14    8.5e+12      0.000       0.630       0.630\n",
            "x56            0.6400   6.99e-14   9.16e+12      0.000       0.640       0.640\n",
            "x57            0.6500   7.43e-14   8.75e+12      0.000       0.650       0.650\n",
            "x58            0.6600   6.45e-14   1.02e+13      0.000       0.660       0.660\n",
            "x59            0.6700   7.42e-14   9.03e+12      0.000       0.670       0.670\n",
            "x60            0.6800    7.1e-14   9.58e+12      0.000       0.680       0.680\n",
            "x61            0.6900   6.71e-14   1.03e+13      0.000       0.690       0.690\n",
            "x62            0.7000    6.6e-14   1.06e+13      0.000       0.700       0.700\n",
            "x63            0.7100    6.8e-14   1.04e+13      0.000       0.710       0.710\n",
            "x64            0.7200   6.72e-14   1.07e+13      0.000       0.720       0.720\n",
            "x65            0.7300   6.84e-14   1.07e+13      0.000       0.730       0.730\n",
            "x66            0.7400   6.95e-14   1.06e+13      0.000       0.740       0.740\n",
            "x67            0.7500   7.58e-14    9.9e+12      0.000       0.750       0.750\n",
            "x68            0.7600   8.52e-14   8.92e+12      0.000       0.760       0.760\n",
            "x69            0.7700   7.17e-14   1.07e+13      0.000       0.770       0.770\n",
            "x70            0.7800   8.55e-14   9.13e+12      0.000       0.780       0.780\n",
            "x71            0.8000   8.58e-14   9.33e+12      0.000       0.800       0.800\n",
            "x72            0.8300   7.09e-14   1.17e+13      0.000       0.830       0.830\n",
            "x73            0.8400   8.71e-14   9.64e+12      0.000       0.840       0.840\n",
            "x74            0.8500   6.97e-14   1.22e+13      0.000       0.850       0.850\n",
            "x75            0.8600   8.72e-14   9.87e+12      0.000       0.860       0.860\n",
            "x76            0.8700    7.4e-14   1.18e+13      0.000       0.870       0.870\n",
            "x77            0.8800   8.73e-14   1.01e+13      0.000       0.880       0.880\n",
            "x78            0.8900   8.82e-14   1.01e+13      0.000       0.890       0.890\n",
            "x79            0.9000   7.23e-14   1.25e+13      0.000       0.900       0.900\n",
            "x80            0.9100   7.79e-14   1.17e+13      0.000       0.910       0.910\n",
            "x81            0.9200   8.73e-14   1.05e+13      0.000       0.920       0.920\n",
            "x82            0.9300   7.83e-14   1.19e+13      0.000       0.930       0.930\n",
            "x83            0.9400   8.87e-14   1.06e+13      0.000       0.940       0.940\n",
            "x84            0.9500   7.84e-14   1.21e+13      0.000       0.950       0.950\n",
            "x85            0.9600   7.21e-14   1.33e+13      0.000       0.960       0.960\n",
            "x86            0.9700   8.79e-14    1.1e+13      0.000       0.970       0.970\n",
            "x87            0.9900   7.24e-14   1.37e+13      0.000       0.990       0.990\n",
            "x88            1.0000   7.41e-14   1.35e+13      0.000       1.000       1.000\n",
            "x89            1.0100   7.14e-14   1.41e+13      0.000       1.010       1.010\n",
            "x90            1.0200   7.76e-14   1.31e+13      0.000       1.020       1.020\n",
            "x91            1.0300   7.55e-14   1.36e+13      0.000       1.030       1.030\n",
            "x92            1.0400   7.31e-14   1.42e+13      0.000       1.040       1.040\n",
            "x93            1.0500   7.31e-14   1.44e+13      0.000       1.050       1.050\n",
            "x94            1.0600    7.6e-14   1.39e+13      0.000       1.060       1.060\n",
            "x95            1.0700    7.5e-14   1.43e+13      0.000       1.070       1.070\n",
            "x96            1.0800   7.43e-14   1.45e+13      0.000       1.080       1.080\n",
            "x97            1.0900   8.15e-14   1.34e+13      0.000       1.090       1.090\n",
            "x98            1.1000   7.48e-14   1.47e+13      0.000       1.100       1.100\n",
            "x99            1.1100   9.16e-14   1.21e+13      0.000       1.110       1.110\n",
            "x100           1.1200   7.77e-14   1.44e+13      0.000       1.120       1.120\n",
            "x101           1.1300    7.7e-14   1.47e+13      0.000       1.130       1.130\n",
            "x102           1.1400    7.5e-14   1.52e+13      0.000       1.140       1.140\n",
            "x103           1.1500   7.55e-14   1.52e+13      0.000       1.150       1.150\n",
            "x104           1.1600   7.97e-14   1.46e+13      0.000       1.160       1.160\n",
            "x105           1.1700    7.8e-14    1.5e+13      0.000       1.170       1.170\n",
            "x106           1.1800   7.57e-14   1.56e+13      0.000       1.180       1.180\n",
            "x107           1.1900    9.3e-14   1.28e+13      0.000       1.190       1.190\n",
            "x108           1.2100   7.75e-14   1.56e+13      0.000       1.210       1.210\n",
            "x109           1.2200   8.11e-14    1.5e+13      0.000       1.220       1.220\n",
            "x110           1.2300   8.48e-14   1.45e+13      0.000       1.230       1.230\n",
            "x111           1.2400   8.52e-14   1.46e+13      0.000       1.240       1.240\n",
            "x112           1.2500   8.24e-14   1.52e+13      0.000       1.250       1.250\n",
            "x113           1.3000   8.32e-14   1.56e+13      0.000       1.300       1.300\n",
            "x114           1.3100   8.61e-14   1.52e+13      0.000       1.310       1.310\n",
            "x115           1.3300    9.9e-14   1.34e+13      0.000       1.330       1.330\n",
            "x116           1.3600    8.8e-14   1.54e+13      0.000       1.360       1.360\n",
            "x117           1.3800   8.76e-14   1.57e+13      0.000       1.380       1.380\n",
            "x118           1.4100   9.81e-14   1.44e+13      0.000       1.410       1.410\n",
            "x119           1.4200   8.85e-14    1.6e+13      0.000       1.420       1.420\n",
            "x120           1.4300   9.78e-14   1.46e+13      0.000       1.430       1.430\n",
            "x121           1.4400   8.69e-14   1.66e+13      0.000       1.440       1.440\n",
            "x122           1.4500   9.83e-14   1.48e+13      0.000       1.450       1.450\n",
            "x123           1.4600   9.05e-14   1.61e+13      0.000       1.460       1.460\n",
            "x124           1.4800   9.95e-14   1.49e+13      0.000       1.480       1.480\n",
            "x125           1.4900   8.76e-14    1.7e+13      0.000       1.490       1.490\n",
            "x126           1.5000   9.94e-14   1.51e+13      0.000       1.500       1.500\n",
            "x127           1.5200   1.01e-13   1.51e+13      0.000       1.520       1.520\n",
            "x128           1.5300      1e-13   1.52e+13      0.000       1.530       1.530\n",
            "x129           1.5900   1.01e-13   1.57e+13      0.000       1.590       1.590\n",
            "x130           1.6600   9.51e-14   1.75e+13      0.000       1.660       1.660\n",
            "x131           1.6900   9.55e-14   1.77e+13      0.000       1.690       1.690\n",
            "x132           1.7100   1.06e-13   1.62e+13      0.000       1.710       1.710\n",
            "x133           1.7300   1.05e-13   1.64e+13      0.000       1.730       1.730\n",
            "x134           1.7400   1.05e-13   1.65e+13      0.000       1.740       1.740\n",
            "x135           1.7500   1.06e-13   1.65e+13      0.000       1.750       1.750\n",
            "x136           1.7700   1.05e-13   1.68e+13      0.000       1.770       1.770\n",
            "x137           1.7800   1.07e-13   1.67e+13      0.000       1.780       1.780\n",
            "x138           1.7900   9.66e-14   1.85e+13      0.000       1.790       1.790\n",
            "x139           1.8100   1.08e-13   1.68e+13      0.000       1.810       1.810\n",
            "x140           1.8300   1.08e-13    1.7e+13      0.000       1.830       1.830\n",
            "x141           1.8500      1e-13   1.84e+13      0.000       1.850       1.850\n",
            "x142           1.8600   1.01e-13   1.84e+13      0.000       1.860       1.860\n",
            "x143           1.9200    1.1e-13   1.75e+13      0.000       1.920       1.920\n",
            "x144           1.9300   1.03e-13   1.87e+13      0.000       1.930       1.930\n",
            "x145           1.9700   1.12e-13   1.76e+13      0.000       1.970       1.970\n",
            "x146           1.9800   1.03e-13   1.92e+13      0.000       1.980       1.980\n",
            "x147           1.9900   1.15e-13   1.73e+13      0.000       1.990       1.990\n",
            "x148           2.0000   1.12e-13   1.78e+13      0.000       2.000       2.000\n",
            "x149           2.0100   1.05e-13   1.92e+13      0.000       2.010       2.010\n",
            "x150           2.0200   1.12e-13    1.8e+13      0.000       2.020       2.020\n",
            "x151           2.0300   1.03e-13   1.97e+13      0.000       2.030       2.030\n",
            "x152           2.0400   1.08e-13   1.89e+13      0.000       2.040       2.040\n",
            "x153           2.0500   1.04e-13   1.96e+13      0.000       2.050       2.050\n",
            "x154           2.0600   1.15e-13   1.78e+13      0.000       2.060       2.060\n",
            "x155           2.0700   1.02e-13   2.03e+13      0.000       2.070       2.070\n",
            "x156           2.0800   1.02e-13   2.03e+13      0.000       2.080       2.080\n",
            "x157           2.0900   1.04e-13   2.01e+13      0.000       2.090       2.090\n",
            "x158           2.1000   1.15e-13   1.82e+13      0.000       2.100       2.100\n",
            "x159           2.1100   1.04e-13   2.02e+13      0.000       2.110       2.110\n",
            "x160           2.1200   1.15e-13   1.84e+13      0.000       2.120       2.120\n",
            "x161           2.1400   1.06e-13   2.02e+13      0.000       2.140       2.140\n",
            "x162           2.1500   1.16e-13   1.85e+13      0.000       2.150       2.150\n",
            "x163           2.1600   1.17e-13   1.84e+13      0.000       2.160       2.160\n",
            "x164           2.1700   1.07e-13   2.02e+13      0.000       2.170       2.170\n",
            "x165           2.1800   1.11e-13   1.96e+13      0.000       2.180       2.180\n",
            "x166           2.1900    1.1e-13      2e+13      0.000       2.190       2.190\n",
            "x167           2.2000   1.12e-13   1.97e+13      0.000       2.200       2.200\n",
            "x168           2.2100   1.17e-13   1.89e+13      0.000       2.210       2.210\n",
            "x169           2.2200   1.21e-13   1.83e+13      0.000       2.220       2.220\n",
            "x170           2.2300   1.12e-13      2e+13      0.000       2.230       2.230\n",
            "x171           2.2400   1.21e-13   1.86e+13      0.000       2.240       2.240\n",
            "x172           2.2500   1.13e-13   1.99e+13      0.000       2.250       2.250\n",
            "x173           2.2600    1.1e-13   2.05e+13      0.000       2.260       2.260\n",
            "x174           2.2700    1.2e-13   1.89e+13      0.000       2.270       2.270\n",
            "x175           2.2900   1.11e-13   2.06e+13      0.000       2.290       2.290\n",
            "x176           2.3100   1.23e-13   1.88e+13      0.000       2.310       2.310\n",
            "x177           2.3200   1.16e-13      2e+13      0.000       2.320       2.320\n",
            "x178           2.3300   1.15e-13   2.02e+13      0.000       2.330       2.330\n",
            "x179           2.3400   1.12e-13   2.08e+13      0.000       2.340       2.340\n",
            "x180           2.3500   1.12e-13    2.1e+13      0.000       2.350       2.350\n",
            "x181           2.3600   1.14e-13   2.07e+13      0.000       2.360       2.360\n",
            "x182           2.3700   1.13e-13    2.1e+13      0.000       2.370       2.370\n",
            "x183           2.3800   1.12e-13   2.12e+13      0.000       2.380       2.380\n",
            "x184           2.3900   1.13e-13   2.12e+13      0.000       2.390       2.390\n",
            "x185           2.4000   1.17e-13   2.05e+13      0.000       2.400       2.400\n",
            "x186           2.4100   1.15e-13    2.1e+13      0.000       2.410       2.410\n",
            "x187           2.4200   1.16e-13   2.09e+13      0.000       2.420       2.420\n",
            "x188           2.4300   1.14e-13   2.13e+13      0.000       2.430       2.430\n",
            "x189           2.4400    1.2e-13   2.04e+13      0.000       2.440       2.440\n",
            "x190           2.4500   1.19e-13   2.05e+13      0.000       2.450       2.450\n",
            "x191           2.4600   1.15e-13   2.14e+13      0.000       2.460       2.460\n",
            "x192           2.4700   1.16e-13   2.13e+13      0.000       2.470       2.470\n",
            "x193           2.4800   1.19e-13   2.09e+13      0.000       2.480       2.480\n",
            "x194           2.4900    1.2e-13   2.08e+13      0.000       2.490       2.490\n",
            "x195           2.5000   1.17e-13   2.13e+13      0.000       2.500       2.500\n",
            "x196           2.5100   1.18e-13   2.14e+13      0.000       2.510       2.510\n",
            "x197           2.5200   1.21e-13   2.08e+13      0.000       2.520       2.520\n",
            "x198           2.5300   1.23e-13   2.05e+13      0.000       2.530       2.530\n",
            "x199           2.5400    1.2e-13   2.11e+13      0.000       2.540       2.540\n",
            "x200           2.5500    1.2e-13   2.12e+13      0.000       2.550       2.550\n",
            "x201           2.5600    1.2e-13   2.13e+13      0.000       2.560       2.560\n",
            "x202           2.5700   1.21e-13   2.12e+13      0.000       2.570       2.570\n",
            "x203           2.5800    1.2e-13   2.16e+13      0.000       2.580       2.580\n",
            "x204           2.5900    1.3e-13   1.99e+13      0.000       2.590       2.590\n",
            "x205           2.6000   1.23e-13   2.11e+13      0.000       2.600       2.600\n",
            "x206           2.6100   1.32e-13   1.98e+13      0.000       2.610       2.610\n",
            "x207           2.6200   1.21e-13   2.16e+13      0.000       2.620       2.620\n",
            "x208           2.6300   1.25e-13   2.11e+13      0.000       2.630       2.630\n",
            "x209           2.6400   1.32e-13      2e+13      0.000       2.640       2.640\n",
            "x210           2.6500   1.32e-13      2e+13      0.000       2.650       2.650\n",
            "x211           2.6600   1.24e-13   2.14e+13      0.000       2.660       2.660\n",
            "x212           2.6700   1.25e-13   2.14e+13      0.000       2.670       2.670\n",
            "x213           2.6800   1.25e-13   2.14e+13      0.000       2.680       2.680\n",
            "x214           2.7000   1.35e-13   1.99e+13      0.000       2.700       2.700\n",
            "x215           2.7200   1.33e-13   2.04e+13      0.000       2.720       2.720\n",
            "x216           2.7300   1.34e-13   2.04e+13      0.000       2.730       2.730\n",
            "x217           2.7400   1.35e-13   2.02e+13      0.000       2.740       2.740\n",
            "x218           2.7500   1.35e-13   2.03e+13      0.000       2.750       2.750\n",
            "x219           2.7600   1.35e-13   2.04e+13      0.000       2.760       2.760\n",
            "x220           2.7700   1.37e-13   2.02e+13      0.000       2.770       2.770\n",
            "x221           2.7800   1.31e-13   2.13e+13      0.000       2.780       2.780\n",
            "x222           2.8000   1.35e-13   2.07e+13      0.000       2.800       2.800\n",
            "x223           2.8100   1.38e-13   2.03e+13      0.000       2.810       2.810\n",
            "x224           2.8200   1.36e-13   2.07e+13      0.000       2.820       2.820\n",
            "x225           2.8400   1.37e-13   2.07e+13      0.000       2.840       2.840\n",
            "x226           2.8500   1.31e-13   2.18e+13      0.000       2.850       2.850\n",
            "x227           2.8900   1.42e-13   2.04e+13      0.000       2.890       2.890\n",
            "x228           2.9000   1.38e-13   2.11e+13      0.000       2.900       2.900\n",
            "x229           2.9100   1.42e-13   2.04e+13      0.000       2.910       2.910\n",
            "x230           2.9500   1.36e-13   2.18e+13      0.000       2.950       2.950\n",
            "x231           2.9800   1.41e-13   2.11e+13      0.000       2.980       2.980\n",
            "x232           3.0200   1.42e-13   2.13e+13      0.000       3.020       3.020\n",
            "x233           3.0400   1.46e-13   2.08e+13      0.000       3.040       3.040\n",
            "x234           3.1000   1.51e-13   2.06e+13      0.000       3.100       3.100\n",
            "x235           3.1300   1.45e-13   2.16e+13      0.000       3.130       3.130\n",
            "x236           3.2600   1.55e-13    2.1e+13      0.000       3.260       3.260\n",
            "x237           3.3400   1.54e-13   2.17e+13      0.000       3.340       3.340\n",
            "x238           3.3900   1.59e-13   2.13e+13      0.000       3.390       3.390\n",
            "x239           3.4000   1.53e-13   2.22e+13      0.000       3.400       3.400\n",
            "x240           3.4200   1.58e-13   2.16e+13      0.000       3.420       3.420\n",
            "x241           3.4500   1.58e-13   2.18e+13      0.000       3.450       3.450\n",
            "x242           3.4700    1.6e-13   2.17e+13      0.000       3.470       3.470\n",
            "x243           3.4800   1.56e-13   2.24e+13      0.000       3.480       3.480\n",
            "x244           3.5000    1.6e-13   2.19e+13      0.000       3.500       3.500\n",
            "x245           3.5100   1.64e-13   2.14e+13      0.000       3.510       3.510\n",
            "x246           3.5200   1.53e-13   2.31e+13      0.000       3.520       3.520\n",
            "x247           3.5500   1.61e-13    2.2e+13      0.000       3.550       3.550\n",
            "x248           3.5900   1.61e-13   2.23e+13      0.000       3.590       3.590\n",
            "x249           3.6000   1.63e-13   2.21e+13      0.000       3.600       3.600\n",
            "x250           3.6400    1.6e-13   2.28e+13      0.000       3.640       3.640\n",
            "x251           3.7900   1.66e-13   2.28e+13      0.000       3.790       3.790\n",
            "x252           3.8300    1.7e-13   2.25e+13      0.000       3.830       3.830\n",
            "x253           3.8900   1.71e-13   2.27e+13      0.000       3.890       3.890\n",
            "x254           4.1200   1.82e-13   2.26e+13      0.000       4.120       4.120\n",
            "x255           4.2200   1.81e-13   2.34e+13      0.000       4.220       4.220\n",
            "x256           4.2800    1.9e-13   2.26e+13      0.000       4.280       4.280\n",
            "x257           4.3200    1.9e-13   2.27e+13      0.000       4.320       4.320\n",
            "x258           4.4000   1.94e-13   2.27e+13      0.000       4.400       4.400\n",
            "x259           4.4200   1.92e-13   2.31e+13      0.000       4.420       4.420\n",
            "x260           4.4300   1.93e-13    2.3e+13      0.000       4.430       4.430\n",
            "x261           4.5400   1.99e-13   2.28e+13      0.000       4.540       4.540\n",
            "x262           4.5500   1.98e-13    2.3e+13      0.000       4.550       4.550\n",
            "x263           4.6100   2.01e-13   2.29e+13      0.000       4.610       4.610\n",
            "x264           4.6400   2.02e-13    2.3e+13      0.000       4.640       4.640\n",
            "x265           4.6700      2e-13   2.33e+13      0.000       4.670       4.670\n",
            "x266           4.6800   2.02e-13   2.32e+13      0.000       4.680       4.680\n",
            "x267           4.7000   2.05e-13    2.3e+13      0.000       4.700       4.700\n",
            "x268           4.7500   2.06e-13    2.3e+13      0.000       4.750       4.750\n",
            "x269           4.8500   2.11e-13   2.29e+13      0.000       4.850       4.850\n",
            "x270           4.8700   2.02e-13   2.41e+13      0.000       4.870       4.870\n",
            "x271           4.8800    2.1e-13   2.32e+13      0.000       4.880       4.880\n",
            "x272           4.9000    2.1e-13   2.33e+13      0.000       4.900       4.900\n",
            "x273           4.9200   2.07e-13   2.38e+13      0.000       4.920       4.920\n",
            "x274           4.9300   2.12e-13   2.32e+13      0.000       4.930       4.930\n",
            "x275           4.9400   2.11e-13   2.34e+13      0.000       4.940       4.940\n",
            "x276           4.9600   2.11e-13   2.35e+13      0.000       4.960       4.960\n",
            "x277           4.9700   2.12e-13   2.34e+13      0.000       4.970       4.970\n",
            "x278           4.9800   2.14e-13   2.33e+13      0.000       4.980       4.980\n",
            "x279           4.9900   2.15e-13   2.32e+13      0.000       4.990       4.990\n",
            "x280           5.0000   2.12e-13   2.35e+13      0.000       5.000       5.000\n",
            "x281           5.0200   2.16e-13   2.32e+13      0.000       5.020       5.020\n",
            "x282           5.0500   2.14e-13   2.36e+13      0.000       5.050       5.050\n",
            "x283           5.0600   2.14e-13   2.36e+13      0.000       5.060       5.060\n",
            "x284           5.0700   2.12e-13    2.4e+13      0.000       5.070       5.070\n",
            "x285           5.0800   2.12e-13    2.4e+13      0.000       5.080       5.080\n",
            "x286           5.1100   2.16e-13   2.37e+13      0.000       5.110       5.110\n",
            "x287           5.1300   2.18e-13   2.35e+13      0.000       5.130       5.130\n",
            "x288           5.1400    2.2e-13   2.34e+13      0.000       5.140       5.140\n",
            "x289           5.1500   2.16e-13   2.38e+13      0.000       5.150       5.150\n",
            "x290           5.1600   2.16e-13   2.39e+13      0.000       5.160       5.160\n",
            "x291           5.1700   2.16e-13   2.39e+13      0.000       5.170       5.170\n",
            "x292           5.2000   2.25e-13   2.32e+13      0.000       5.200       5.200\n",
            "x293           5.2200    2.2e-13   2.37e+13      0.000       5.220       5.220\n",
            "x294           5.2300    2.2e-13   2.38e+13      0.000       5.230       5.230\n",
            "x295           5.2400   2.22e-13   2.36e+13      0.000       5.240       5.240\n",
            "x296           5.2900   2.27e-13   2.33e+13      0.000       5.290       5.290\n",
            "x297           5.3200   2.25e-13   2.36e+13      0.000       5.320       5.320\n",
            "x298           5.3300   2.24e-13   2.38e+13      0.000       5.330       5.330\n",
            "x299           5.3400    2.2e-13   2.43e+13      0.000       5.340       5.340\n",
            "x300           5.3500   2.24e-13   2.38e+13      0.000       5.350       5.350\n",
            "x301           5.3600   2.29e-13   2.34e+13      0.000       5.360       5.360\n",
            "x302           5.3800   2.29e-13   2.35e+13      0.000       5.380       5.380\n",
            "x303           5.3900   2.24e-13   2.41e+13      0.000       5.390       5.390\n",
            "x304           5.4200   2.28e-13   2.38e+13      0.000       5.420       5.420\n",
            "x305           5.4700   2.32e-13   2.36e+13      0.000       5.470       5.470\n",
            "x306           5.4900   2.36e-13   2.33e+13      0.000       5.490       5.490\n",
            "x307           5.5800   2.42e-13    2.3e+13      0.000       5.580       5.580\n",
            "x308           5.6100   2.43e-13   2.31e+13      0.000       5.610       5.610\n",
            "x309           5.6700   2.42e-13   2.35e+13      0.000       5.670       5.670\n",
            "x310           5.7200   2.42e-13   2.37e+13      0.000       5.720       5.720\n",
            "x311           5.7300    2.4e-13   2.39e+13      0.000       5.730       5.730\n",
            "x312           5.7800   2.41e-13    2.4e+13      0.000       5.780       5.780\n",
            "x313           5.8100   2.45e-13   2.37e+13      0.000       5.810       5.810\n",
            "x314           5.8500   2.38e-13   2.45e+13      0.000       5.850       5.850\n",
            "x315           5.8700   2.46e-13   2.38e+13      0.000       5.870       5.870\n",
            "x316           5.8800   2.41e-13   2.44e+13      0.000       5.880       5.880\n",
            "x317           5.8900   2.48e-13   2.38e+13      0.000       5.890       5.890\n",
            "x318           5.9600    2.5e-13   2.39e+13      0.000       5.960       5.960\n",
            "x319           5.9700   2.53e-13   2.36e+13      0.000       5.970       5.970\n",
            "x320           6.0000   2.59e-13   2.32e+13      0.000       6.000       6.000\n",
            "x321           6.0500   2.48e-13   2.44e+13      0.000       6.050       6.050\n",
            "x322           6.7700   2.85e-13   2.37e+13      0.000       6.770       6.770\n",
            "x323           6.8400   2.87e-13   2.39e+13      0.000       6.840       6.840\n",
            "x324           6.9100   2.91e-13   2.37e+13      0.000       6.910       6.910\n",
            "x325           7.0600   2.86e-13   2.47e+13      0.000       7.060       7.060\n",
            "x326           7.0700   2.92e-13   2.42e+13      0.000       7.070       7.070\n",
            "x327           7.0900   2.88e-13   2.46e+13      0.000       7.090       7.090\n",
            "x328           7.1500   2.97e-13   2.41e+13      0.000       7.150       7.150\n",
            "x329           7.1800   2.91e-13   2.47e+13      0.000       7.180       7.180\n",
            "x330           7.2100   3.01e-13   2.39e+13      0.000       7.210       7.210\n",
            "x331           7.2900   3.05e-13   2.39e+13      0.000       7.290       7.290\n",
            "x332           7.3100   3.07e-13   2.38e+13      0.000       7.310       7.310\n",
            "x333           7.3200   3.09e-13   2.37e+13      0.000       7.320       7.320\n",
            "x334           7.8300   3.16e-13   2.48e+13      0.000       7.830       7.830\n",
            "x335           7.9100   3.29e-13   2.41e+13      0.000       7.910       7.910\n",
            "x336           7.9300   3.23e-13   2.45e+13      0.000       7.930       7.930\n",
            "x337           7.9400   3.21e-13   2.47e+13      0.000       7.940       7.940\n",
            "x338           7.9900   3.35e-13   2.39e+13      0.000       7.990       7.990\n",
            "x339           8.0900   3.31e-13   2.44e+13      0.000       8.090       8.090\n",
            "x340           8.1300   3.35e-13   2.43e+13      0.000       8.130       8.130\n",
            "x341           8.1500   3.34e-13   2.44e+13      0.000       8.150       8.150\n",
            "x342           8.1900   3.42e-13   2.39e+13      0.000       8.190       8.190\n",
            "x343           8.2000   3.38e-13   2.43e+13      0.000       8.200       8.200\n",
            "x344           8.2600   3.38e-13   2.44e+13      0.000       8.260       8.260\n",
            "x345           8.2800   3.41e-13   2.43e+13      0.000       8.280       8.280\n",
            "x346           8.2900   3.42e-13   2.42e+13      0.000       8.290       8.290\n",
            "x347           8.3100   3.42e-13   2.43e+13      0.000       8.310       8.310\n",
            "x348           8.3200   3.44e-13   2.42e+13      0.000       8.320       8.320\n",
            "x349           8.3600   3.41e-13   2.45e+13      0.000       8.360       8.360\n",
            "x350           8.3700   3.45e-13   2.43e+13      0.000       8.370       8.370\n",
            "x351           8.3800    3.4e-13   2.46e+13      0.000       8.380       8.380\n",
            "x352           8.4000   3.45e-13   2.43e+13      0.000       8.400       8.400\n",
            "x353           8.4100   3.46e-13   2.43e+13      0.000       8.410       8.410\n",
            "x354           8.4200   3.43e-13   2.46e+13      0.000       8.420       8.420\n",
            "x355           8.4300   3.41e-13   2.47e+13      0.000       8.430       8.430\n",
            "x356           8.4600   3.41e-13   2.48e+13      0.000       8.460       8.460\n",
            "x357           8.4700   3.44e-13   2.46e+13      0.000       8.470       8.470\n",
            "x358           8.4800   3.46e-13   2.45e+13      0.000       8.480       8.480\n",
            "x359           8.4900   3.46e-13   2.45e+13      0.000       8.490       8.490\n",
            "x360           8.5100   3.45e-13   2.47e+13      0.000       8.510       8.510\n",
            "x361           8.5400   3.47e-13   2.46e+13      0.000       8.540       8.540\n",
            "x362           8.5600   3.55e-13   2.41e+13      0.000       8.560       8.560\n",
            "x363           8.5700   3.46e-13   2.47e+13      0.000       8.570       8.570\n",
            "x364           8.6600   3.57e-13   2.43e+13      0.000       8.660       8.660\n",
            "x365           8.6700   3.51e-13   2.47e+13      0.000       8.670       8.670\n",
            "x366           8.7000   3.69e-13   2.36e+13      0.000       8.700       8.700\n",
            "x367           8.7200   3.51e-13   2.49e+13      0.000       8.720       8.720\n",
            "x368           8.7300   3.61e-13   2.42e+13      0.000       8.730       8.730\n",
            "x369           8.7400   3.62e-13   2.42e+13      0.000       8.740       8.740\n",
            "x370           8.7500   3.57e-13   2.45e+13      0.000       8.750       8.750\n",
            "x371           8.7700   3.53e-13   2.49e+13      0.000       8.770       8.770\n",
            "x372           8.8200   3.55e-13   2.48e+13      0.000       8.820       8.820\n",
            "x373           8.8400   3.63e-13   2.44e+13      0.000       8.840       8.840\n",
            "x374           8.9000    3.6e-13   2.48e+13      0.000       8.900       8.900\n",
            "x375           8.9100   3.68e-13   2.42e+13      0.000       8.910       8.910\n",
            "x376           8.9200   3.58e-13   2.49e+13      0.000       8.920       8.920\n",
            "x377           8.9300   3.61e-13   2.47e+13      0.000       8.930       8.930\n",
            "x378           8.9600   3.69e-13   2.43e+13      0.000       8.960       8.960\n",
            "x379           8.9900   3.59e-13    2.5e+13      0.000       8.990       8.990\n",
            "x380           9.0100    3.7e-13   2.43e+13      0.000       9.010       9.010\n",
            "x381           9.0400   3.78e-13   2.39e+13      0.000       9.040       9.040\n",
            "x382           9.0500   3.68e-13   2.46e+13      0.000       9.050       9.050\n",
            "x383           9.0600   3.74e-13   2.42e+13      0.000       9.060       9.060\n",
            "x384           9.1100   3.71e-13   2.46e+13      0.000       9.110       9.110\n",
            "x385           9.1400   3.64e-13   2.51e+13      0.000       9.140       9.140\n",
            "x386           9.1700   3.72e-13   2.46e+13      0.000       9.170       9.170\n",
            "x387           9.1800   3.77e-13   2.43e+13      0.000       9.180       9.180\n",
            "x388           9.2100   3.77e-13   2.44e+13      0.000       9.210       9.210\n",
            "x389           9.2300   3.74e-13   2.47e+13      0.000       9.230       9.230\n",
            "x390           9.2400   3.76e-13   2.46e+13      0.000       9.240       9.240\n",
            "x391           9.2600   3.81e-13   2.43e+13      0.000       9.260       9.260\n",
            "x392           9.2700   3.74e-13   2.48e+13      0.000       9.270       9.270\n",
            "x393           9.2800   3.69e-13   2.51e+13      0.000       9.280       9.280\n",
            "x394           9.2900   3.83e-13   2.42e+13      0.000       9.290       9.290\n",
            "x395           9.3100   3.78e-13   2.46e+13      0.000       9.310       9.310\n",
            "x396           9.3300   3.76e-13   2.48e+13      0.000       9.330       9.330\n",
            "x397           9.3500   3.84e-13   2.44e+13      0.000       9.350       9.350\n",
            "x398           9.3600   3.73e-13   2.51e+13      0.000       9.360       9.360\n",
            "x399           9.3700   3.87e-13   2.42e+13      0.000       9.370       9.370\n",
            "x400           9.3800   3.78e-13   2.48e+13      0.000       9.380       9.380\n",
            "x401           9.4200   3.78e-13   2.49e+13      0.000       9.420       9.420\n",
            "x402           9.4500   3.77e-13    2.5e+13      0.000       9.450       9.450\n",
            "x403           9.4700   3.82e-13   2.48e+13      0.000       9.470       9.470\n",
            "x404           9.4900   3.87e-13   2.45e+13      0.000       9.490       9.490\n",
            "x405           9.5000   3.84e-13   2.48e+13      0.000       9.500       9.500\n",
            "x406           9.5100   3.83e-13   2.48e+13      0.000       9.510       9.510\n",
            "x407           9.5500   3.89e-13   2.46e+13      0.000       9.550       9.550\n",
            "x408           9.5700   3.94e-13   2.43e+13      0.000       9.570       9.570\n",
            "x409           9.5800   3.97e-13   2.41e+13      0.000       9.580       9.580\n",
            "x410           9.6000   3.99e-13   2.41e+13      0.000       9.600       9.600\n",
            "x411           9.6200   3.93e-13   2.45e+13      0.000       9.620       9.620\n",
            "x412           9.6300   3.93e-13   2.45e+13      0.000       9.630       9.630\n",
            "x413           9.6400    3.9e-13   2.47e+13      0.000       9.640       9.640\n",
            "x414           9.6600   3.88e-13   2.49e+13      0.000       9.660       9.660\n",
            "x415           9.6900   3.77e-13   2.57e+13      0.000       9.690       9.690\n",
            "x416           9.7000   3.94e-13   2.46e+13      0.000       9.700       9.700\n",
            "x417           9.7200   3.94e-13   2.47e+13      0.000       9.720       9.720\n",
            "x418           9.7400   3.97e-13   2.46e+13      0.000       9.740       9.740\n",
            "x419           9.7500   3.97e-13   2.45e+13      0.000       9.750       9.750\n",
            "x420           9.7600   3.99e-13   2.45e+13      0.000       9.760       9.760\n",
            "x421           9.7800   3.95e-13   2.47e+13      0.000       9.780       9.780\n",
            "x422           9.7900   4.01e-13   2.44e+13      0.000       9.790       9.790\n",
            "x423           9.8000      4e-13   2.45e+13      0.000       9.800       9.800\n",
            "x424           9.8100   3.96e-13   2.48e+13      0.000       9.810       9.810\n",
            "x425           9.8200   3.98e-13   2.47e+13      0.000       9.820       9.820\n",
            "x426           9.8400   3.95e-13   2.49e+13      0.000       9.840       9.840\n",
            "x427           9.8500   3.97e-13   2.48e+13      0.000       9.850       9.850\n",
            "x428           9.8700   4.03e-13   2.45e+13      0.000       9.870       9.870\n",
            "x429           9.8800   3.99e-13   2.48e+13      0.000       9.880       9.880\n",
            "x430           9.8900   3.98e-13   2.49e+13      0.000       9.890       9.890\n",
            "x431           9.9000   4.05e-13   2.44e+13      0.000       9.900       9.900\n",
            "x432           9.9300   4.08e-13   2.43e+13      0.000       9.930       9.930\n",
            "x433           9.9500   3.93e-13   2.53e+13      0.000       9.950       9.950\n",
            "x434           9.9600   4.02e-13   2.48e+13      0.000       9.960       9.960\n",
            "x435           9.9700   3.98e-13    2.5e+13      0.000       9.970       9.970\n",
            "x436           9.9800   4.06e-13   2.46e+13      0.000       9.980       9.980\n",
            "x437           9.9900   4.04e-13   2.48e+13      0.000       9.990       9.990\n",
            "x438          10.0200   4.06e-13   2.47e+13      0.000      10.020      10.020\n",
            "x439          10.0300   4.03e-13   2.49e+13      0.000      10.030      10.030\n",
            "x440          10.0600   4.09e-13   2.46e+13      0.000      10.060      10.060\n",
            "x441          10.0800   4.09e-13   2.46e+13      0.000      10.080      10.080\n",
            "x442          10.0900   4.06e-13   2.48e+13      0.000      10.090      10.090\n",
            "x443          10.1000   4.14e-13   2.44e+13      0.000      10.100      10.100\n",
            "x444          10.1400   4.14e-13   2.45e+13      0.000      10.140      10.140\n",
            "x445          10.1500   4.14e-13   2.45e+13      0.000      10.150      10.150\n",
            "x446          10.1600    4.1e-13   2.48e+13      0.000      10.160      10.160\n",
            "x447          10.1900   4.09e-13   2.49e+13      0.000      10.190      10.190\n",
            "x448          10.2000   4.15e-13   2.46e+13      0.000      10.200      10.200\n",
            "x449          10.2200   4.07e-13   2.51e+13      0.000      10.220      10.220\n",
            "x450          10.2600   4.13e-13   2.48e+13      0.000      10.260      10.260\n",
            "x451          10.2800   4.14e-13   2.49e+13      0.000      10.280      10.280\n",
            "x452          10.2900   4.17e-13   2.47e+13      0.000      10.290      10.290\n",
            "x453          10.3100   4.15e-13   2.49e+13      0.000      10.310      10.310\n",
            "x454          10.3300   4.13e-13    2.5e+13      0.000      10.330      10.330\n",
            "x455          10.3400   4.17e-13   2.48e+13      0.000      10.340      10.340\n",
            "x456          10.3500   4.23e-13   2.45e+13      0.000      10.350      10.350\n",
            "x457          10.3900   4.26e-13   2.44e+13      0.000      10.390      10.390\n",
            "x458          10.4000   4.21e-13   2.47e+13      0.000      10.400      10.400\n",
            "x459          10.4100   4.21e-13   2.47e+13      0.000      10.410      10.410\n",
            "x460          10.4300   4.22e-13   2.47e+13      0.000      10.430      10.430\n",
            "x461          10.4400   4.13e-13   2.53e+13      0.000      10.440      10.440\n",
            "x462          10.4500    4.2e-13   2.49e+13      0.000      10.450      10.450\n",
            "x463          10.4700   4.15e-13   2.52e+13      0.000      10.470      10.470\n",
            "x464          10.4900   4.32e-13   2.43e+13      0.000      10.490      10.490\n",
            "x465          10.5000   4.32e-13   2.43e+13      0.000      10.500      10.500\n",
            "x466          10.5100   4.26e-13   2.47e+13      0.000      10.510      10.510\n",
            "x467          10.5200   4.22e-13   2.49e+13      0.000      10.520      10.520\n",
            "x468          10.5300   4.28e-13   2.46e+13      0.000      10.530      10.530\n",
            "x469          10.5500    4.3e-13   2.45e+13      0.000      10.550      10.550\n",
            "x470          10.5600   4.24e-13   2.49e+13      0.000      10.560      10.560\n",
            "x471          10.5700   4.34e-13   2.44e+13      0.000      10.570      10.570\n",
            "x472          10.5800   4.25e-13   2.49e+13      0.000      10.580      10.580\n",
            "x473          10.6000   4.31e-13   2.46e+13      0.000      10.600      10.600\n",
            "x474          10.6100   4.28e-13   2.48e+13      0.000      10.610      10.610\n",
            "x475          10.6200   4.33e-13   2.45e+13      0.000      10.620      10.620\n",
            "x476          10.6300   4.29e-13   2.48e+13      0.000      10.630      10.630\n",
            "x477          10.6400   4.35e-13   2.45e+13      0.000      10.640      10.640\n",
            "x478          10.6600   4.29e-13   2.49e+13      0.000      10.660      10.660\n",
            "x479          10.6800   4.34e-13   2.46e+13      0.000      10.680      10.680\n",
            "x480          10.6900   4.39e-13   2.44e+13      0.000      10.690      10.690\n",
            "x481          10.7100   4.44e-13   2.41e+13      0.000      10.710      10.710\n",
            "x482          10.7200   4.41e-13   2.43e+13      0.000      10.720      10.720\n",
            "x483          10.7500   4.37e-13   2.46e+13      0.000      10.750      10.750\n",
            "x484          10.7600   4.48e-13    2.4e+13      0.000      10.760      10.760\n",
            "x485          10.7900   4.43e-13   2.44e+13      0.000      10.790      10.790\n",
            "x486          10.8000   4.33e-13    2.5e+13      0.000      10.800      10.800\n",
            "x487          10.8100   4.35e-13   2.48e+13      0.000      10.810      10.810\n",
            "x488          10.8300   4.39e-13   2.47e+13      0.000      10.830      10.830\n",
            "x489          10.8500   4.42e-13   2.45e+13      0.000      10.850      10.850\n",
            "x490          10.8600   4.39e-13   2.48e+13      0.000      10.860      10.860\n",
            "x491          10.8800    4.4e-13   2.47e+13      0.000      10.880      10.880\n",
            "x492          10.9000   4.43e-13   2.46e+13      0.000      10.900      10.900\n",
            "x493          10.9100    4.5e-13   2.42e+13      0.000      10.910      10.910\n",
            "x494          10.9300   4.46e-13   2.45e+13      0.000      10.930      10.930\n",
            "x495          10.9700   4.52e-13   2.43e+13      0.000      10.970      10.970\n",
            "x496          10.9800   4.47e-13   2.46e+13      0.000      10.980      10.980\n",
            "x497          10.9900   4.48e-13   2.45e+13      0.000      10.990      10.990\n",
            "x498          11.0100   4.47e-13   2.46e+13      0.000      11.010      11.010\n",
            "x499          11.0200   4.51e-13   2.45e+13      0.000      11.020      11.020\n",
            "x500          11.0300   4.42e-13    2.5e+13      0.000      11.030      11.030\n",
            "x501          11.0500   4.42e-13    2.5e+13      0.000      11.050      11.050\n",
            "x502          11.0900   4.47e-13   2.48e+13      0.000      11.090      11.090\n",
            "x503          11.1200   4.46e-13   2.49e+13      0.000      11.120      11.120\n",
            "x504          11.1300   4.42e-13   2.52e+13      0.000      11.130      11.130\n",
            "x505          11.1400   4.53e-13   2.46e+13      0.000      11.140      11.140\n",
            "x506          11.1700   4.45e-13   2.51e+13      0.000      11.170      11.170\n",
            "x507          11.2000   4.52e-13   2.48e+13      0.000      11.200      11.200\n",
            "x508          11.2100   4.48e-13    2.5e+13      0.000      11.210      11.210\n",
            "x509          11.2200   4.59e-13   2.45e+13      0.000      11.220      11.220\n",
            "x510          11.2400   4.55e-13   2.47e+13      0.000      11.240      11.240\n",
            "x511          11.2500   4.57e-13   2.46e+13      0.000      11.250      11.250\n",
            "x512          11.2800   4.44e-13   2.54e+13      0.000      11.280      11.280\n",
            "x513          11.3000   4.58e-13   2.47e+13      0.000      11.300      11.300\n",
            "x514          11.3200   4.57e-13   2.48e+13      0.000      11.320      11.320\n",
            "x515          11.3300   4.52e-13    2.5e+13      0.000      11.330      11.330\n",
            "x516          11.3500   4.61e-13   2.46e+13      0.000      11.350      11.350\n",
            "x517          11.3600   4.56e-13   2.49e+13      0.000      11.360      11.360\n",
            "x518          11.3700   4.61e-13   2.47e+13      0.000      11.370      11.370\n",
            "x519          11.3800    4.6e-13   2.48e+13      0.000      11.380      11.380\n",
            "x520          11.4000   4.57e-13   2.49e+13      0.000      11.400      11.400\n",
            "x521          11.4100    4.6e-13   2.48e+13      0.000      11.410      11.410\n",
            "x522          11.4200   4.52e-13   2.53e+13      0.000      11.420      11.420\n",
            "x523          11.4300   4.64e-13   2.47e+13      0.000      11.430      11.430\n",
            "x524          11.4600   4.66e-13   2.46e+13      0.000      11.460      11.460\n",
            "x525          11.4800   4.62e-13   2.49e+13      0.000      11.480      11.480\n",
            "x526          11.4900   4.64e-13   2.48e+13      0.000      11.490      11.490\n",
            "x527          11.5000   4.62e-13   2.49e+13      0.000      11.500      11.500\n",
            "x528          11.5100   4.59e-13   2.51e+13      0.000      11.510      11.510\n",
            "x529          11.5700   4.65e-13   2.49e+13      0.000      11.570      11.570\n",
            "x530          11.6000   4.75e-13   2.44e+13      0.000      11.600      11.600\n",
            "x531          11.6100    4.7e-13   2.47e+13      0.000      11.610      11.610\n",
            "x532          11.6200    4.7e-13   2.47e+13      0.000      11.620      11.620\n",
            "x533          11.6300   4.79e-13   2.43e+13      0.000      11.630      11.630\n",
            "x534          11.6400   4.72e-13   2.47e+13      0.000      11.640      11.640\n",
            "x535          11.6500    4.6e-13   2.53e+13      0.000      11.650      11.650\n",
            "x536          11.6700   4.78e-13   2.44e+13      0.000      11.670      11.670\n",
            "x537          11.6800   4.71e-13   2.48e+13      0.000      11.680      11.680\n",
            "x538          11.6900   4.73e-13   2.47e+13      0.000      11.690      11.690\n",
            "x539          11.7000   4.73e-13   2.47e+13      0.000      11.700      11.700\n",
            "x540          11.7100   4.68e-13    2.5e+13      0.000      11.710      11.710\n",
            "x541          11.7200   4.73e-13   2.48e+13      0.000      11.720      11.720\n",
            "x542          11.7400   4.79e-13   2.45e+13      0.000      11.740      11.740\n",
            "x543          11.7500   4.75e-13   2.47e+13      0.000      11.750      11.750\n",
            "x544          11.7800   4.87e-13   2.42e+13      0.000      11.780      11.780\n",
            "x545          11.7900   4.76e-13   2.48e+13      0.000      11.790      11.790\n",
            "x546          11.8000   4.75e-13   2.48e+13      0.000      11.800      11.800\n",
            "x547          11.8100   4.79e-13   2.47e+13      0.000      11.810      11.810\n",
            "x548          11.8500   4.88e-13   2.43e+13      0.000      11.850      11.850\n",
            "x549          11.8600   4.75e-13    2.5e+13      0.000      11.860      11.860\n",
            "x550          11.8700   4.79e-13   2.48e+13      0.000      11.870      11.870\n",
            "x551          11.9000   4.81e-13   2.48e+13      0.000      11.900      11.900\n",
            "x552          11.9100    4.9e-13   2.43e+13      0.000      11.910      11.910\n",
            "x553          11.9200   4.85e-13   2.46e+13      0.000      11.920      11.920\n",
            "x554          11.9300   4.82e-13   2.47e+13      0.000      11.930      11.930\n",
            "x555          11.9400   4.81e-13   2.48e+13      0.000      11.940      11.940\n",
            "x556          11.9600   4.76e-13   2.51e+13      0.000      11.960      11.960\n",
            "x557          11.9900   4.88e-13   2.46e+13      0.000      11.990      11.990\n",
            "x558          12.0000   4.79e-13    2.5e+13      0.000      12.000      12.000\n",
            "x559          12.0100   4.74e-13   2.53e+13      0.000      12.010      12.010\n",
            "x560          12.0300    4.9e-13   2.45e+13      0.000      12.030      12.030\n",
            "x561          12.0700   4.87e-13   2.48e+13      0.000      12.070      12.070\n",
            "x562          12.0800   4.82e-13   2.51e+13      0.000      12.080      12.080\n",
            "x563          12.0900   4.86e-13   2.49e+13      0.000      12.090      12.090\n",
            "x564          12.1100   4.94e-13   2.45e+13      0.000      12.110      12.110\n",
            "x565          12.1200    4.8e-13   2.53e+13      0.000      12.120      12.120\n",
            "x566          12.1700   4.97e-13   2.45e+13      0.000      12.170      12.170\n",
            "x567          12.1800   4.86e-13    2.5e+13      0.000      12.180      12.180\n",
            "x568          12.1900   4.87e-13    2.5e+13      0.000      12.190      12.190\n",
            "x569          12.2000   4.95e-13   2.47e+13      0.000      12.200      12.200\n",
            "x570          12.2600   4.94e-13   2.48e+13      0.000      12.260      12.260\n",
            "x571          12.2700   4.96e-13   2.47e+13      0.000      12.270      12.270\n",
            "x572          12.2800   5.07e-13   2.42e+13      0.000      12.280      12.280\n",
            "x573          12.2900   4.92e-13    2.5e+13      0.000      12.290      12.290\n",
            "x574          12.3000   4.88e-13   2.52e+13      0.000      12.300      12.300\n",
            "x575          12.3300   4.94e-13    2.5e+13      0.000      12.330      12.330\n",
            "x576          12.3600   4.87e-13   2.54e+13      0.000      12.360      12.360\n",
            "x577          12.3800   4.97e-13   2.49e+13      0.000      12.380      12.380\n",
            "x578          12.4300   4.96e-13    2.5e+13      0.000      12.430      12.430\n",
            "x579          12.4500   4.97e-13   2.51e+13      0.000      12.450      12.450\n",
            "x580          12.4600   5.01e-13   2.48e+13      0.000      12.460      12.460\n",
            "x581          12.4800   4.96e-13   2.52e+13      0.000      12.480      12.480\n",
            "x582          12.4900   4.99e-13    2.5e+13      0.000      12.490      12.490\n",
            "x583          12.5000   5.01e-13   2.49e+13      0.000      12.500      12.500\n",
            "x584          12.5400    5.1e-13   2.46e+13      0.000      12.540      12.540\n",
            "x585          12.5500   5.13e-13   2.44e+13      0.000      12.550      12.550\n",
            "x586          12.5800   5.08e-13   2.47e+13      0.000      12.580      12.580\n",
            "x587          12.6000   5.09e-13   2.48e+13      0.000      12.600      12.600\n",
            "x588          12.6300   5.11e-13   2.47e+13      0.000      12.630      12.630\n",
            "x589          12.6400   5.09e-13   2.48e+13      0.000      12.640      12.640\n",
            "x590          12.6600   5.11e-13   2.48e+13      0.000      12.660      12.660\n",
            "x591          12.6700   5.07e-13    2.5e+13      0.000      12.670      12.670\n",
            "x592          12.7000   5.04e-13   2.52e+13      0.000      12.700      12.700\n",
            "x593          12.7600   4.99e-13   2.56e+13      0.000      12.760      12.760\n",
            "x594          12.7800   5.07e-13   2.52e+13      0.000      12.780      12.780\n",
            "x595          12.8400   5.27e-13   2.44e+13      0.000      12.840      12.840\n",
            "x596          12.9300   5.21e-13   2.48e+13      0.000      12.930      12.930\n",
            "x597          13.0200   5.19e-13   2.51e+13      0.000      13.020      13.020\n",
            "x598          13.1400   5.38e-13   2.44e+13      0.000      13.140      13.140\n",
            "x599          13.2300   5.27e-13   2.51e+13      0.000      13.230      13.230\n",
            "x600          13.2700   5.46e-13   2.43e+13      0.000      13.270      13.270\n",
            "x601          13.3400   5.26e-13   2.54e+13      0.000      13.340      13.340\n",
            "x602          13.3500   5.47e-13   2.44e+13      0.000      13.350      13.350\n",
            "x603          13.3700   5.45e-13   2.45e+13      0.000      13.370      13.370\n",
            "x604          13.3800   5.44e-13   2.46e+13      0.000      13.380      13.380\n",
            "x605          13.4900   5.34e-13   2.53e+13      0.000      13.490      13.490\n",
            "x606          13.5400   5.41e-13    2.5e+13      0.000      13.540      13.540\n",
            "x607          13.5800   5.43e-13    2.5e+13      0.000      13.580      13.580\n",
            "x608          13.6300   5.38e-13   2.53e+13      0.000      13.630      13.630\n",
            "x609          13.6900   5.46e-13   2.51e+13      0.000      13.690      13.690\n",
            "x610          13.8800   5.51e-13   2.52e+13      0.000      13.880      13.880\n",
            "x611          14.0300   5.75e-13   2.44e+13      0.000      14.030      14.030\n",
            "x612          14.0500   5.61e-13    2.5e+13      0.000      14.050      14.050\n",
            "x613          14.1100   5.62e-13   2.51e+13      0.000      14.110      14.110\n",
            "x614          14.1800   5.67e-13    2.5e+13      0.000      14.180      14.180\n",
            "x615          14.2300   5.63e-13   2.53e+13      0.000      14.230      14.230\n",
            "x616          14.4300   5.76e-13   2.51e+13      0.000      14.430      14.430\n",
            "x617          14.5700   5.92e-13   2.46e+13      0.000      14.570      14.570\n",
            "x618          14.6300   5.77e-13   2.54e+13      0.000      14.630      14.630\n",
            "x619          14.6500   5.91e-13   2.48e+13      0.000      14.650      14.650\n",
            "x620          14.7000   5.92e-13   2.48e+13      0.000      14.700      14.700\n",
            "x621          14.7200   5.88e-13    2.5e+13      0.000      14.720      14.720\n",
            "x622          14.7400   5.85e-13   2.52e+13      0.000      14.740      14.740\n",
            "x623          14.8800   6.05e-13   2.46e+13      0.000      14.880      14.880\n",
            "x624          14.9000   6.07e-13   2.46e+13      0.000      14.900      14.900\n",
            "x625          14.9300   5.95e-13   2.51e+13      0.000      14.930      14.930\n",
            "x626          14.9400   6.06e-13   2.47e+13      0.000      14.940      14.940\n",
            "x627          14.9600   6.13e-13   2.44e+13      0.000      14.960      14.960\n",
            "x628          14.9900   5.94e-13   2.52e+13      0.000      14.990      14.990\n",
            "x629          15.0400   5.86e-13   2.57e+13      0.000      15.040      15.040\n",
            "x630          15.0700   6.09e-13   2.47e+13      0.000      15.070      15.070\n",
            "x631          15.0900   6.07e-13   2.49e+13      0.000      15.090      15.090\n",
            "x632          15.2300   6.06e-13   2.51e+13      0.000      15.230      15.230\n",
            "x633          15.2500   6.09e-13    2.5e+13      0.000      15.250      15.250\n",
            "x634          15.4900    6.2e-13    2.5e+13      0.000      15.490      15.490\n",
            "x635          16.7100   6.83e-13   2.45e+13      0.000      16.710      16.710\n",
            "x636          16.7300   6.54e-13   2.56e+13      0.000      16.730      16.730\n",
            "x637          16.8600   6.89e-13   2.45e+13      0.000      16.860      16.860\n",
            "x638          16.8700   6.81e-13   2.48e+13      0.000      16.870      16.870\n",
            "x639          17.1700   6.79e-13   2.53e+13      0.000      17.170      17.170\n",
            "x640          17.3200   7.02e-13   2.47e+13      0.000      17.320      17.320\n",
            "x641          17.4400   7.06e-13   2.47e+13      0.000      17.440      17.440\n",
            "x642          17.4800   7.09e-13   2.46e+13      0.000      17.480      17.480\n",
            "x643          17.7100   7.19e-13   2.46e+13      0.000      17.710      17.710\n",
            "x644          17.8000   7.34e-13   2.42e+13      0.000      17.800      17.800\n",
            "x645          17.8100   6.97e-13   2.56e+13      0.000      17.810      17.810\n",
            "x646          17.9400    7.1e-13   2.53e+13      0.000      17.940      17.940\n",
            "x647          17.9600   7.19e-13    2.5e+13      0.000      17.960      17.960\n",
            "x648          18.0800   7.19e-13   2.52e+13      0.000      18.080      18.080\n",
            "x649          18.1100   7.26e-13   2.49e+13      0.000      18.110      18.110\n",
            "x650          18.1500   7.12e-13   2.55e+13      0.000      18.150      18.150\n",
            "x651          18.3600   7.24e-13   2.54e+13      0.000      18.360      18.360\n",
            "x652          18.4000   7.35e-13    2.5e+13      0.000      18.400      18.400\n",
            "x653          18.7800   7.46e-13   2.52e+13      0.000      18.780      18.780\n",
            "x654          19.2800   7.66e-13   2.52e+13      0.000      19.280      19.280\n",
            "x655          20.6700   8.17e-13   2.53e+13      0.000      20.670      20.670\n",
            "x656          22.3600   8.79e-13   2.54e+13      0.000      22.360      22.360\n",
            "x657          23.6400   9.96e-13   2.37e+13      0.000      23.640      23.640\n",
            "x658       -1.066e-14   3.32e-14     -0.321      0.748   -7.59e-14    5.46e-14\n",
            "x659        3.375e-14   3.89e-14      0.868      0.386   -4.27e-14     1.1e-13\n",
            "x660        3.197e-14   3.91e-14      0.818      0.414   -4.48e-14    1.09e-13\n",
            "==============================================================================\n",
            "Omnibus:                       14.055   Durbin-Watson:                   1.803\n",
            "Prob(Omnibus):                  0.001   Jarque-Bera (JB):               17.332\n",
            "Skew:                          -0.169   Prob(JB):                     0.000172\n",
            "Kurtosis:                       3.491   Cond. No.                     7.86e+04\n",
            "==============================================================================\n",
            "\n",
            "Warnings:\n",
            "[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.\n",
            "[2] The condition number is large, 7.86e+04. This might indicate that there are\n",
            "strong multicollinearity or other numerical problems.\n"
          ]
        }
      ],
      "execution_count": 12,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "model.rsquared"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 13,
          "data": {
            "text/plain": [
              "1.0"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 13,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from statsmodels.formula.api import ols\n",
        "from statsmodels.stats.anova import anova_lm\n",
        "\n",
        "model = ols(\"Close ~ Open + High + Low\", dataset).fit()\n",
        "\n",
        "# Print the summary\n",
        "print(model.summary())\n",
        "\n",
        "print(\"\\nRetrieving manually the parameter estimates:\")\n",
        "print(model._results.params)\n",
        "\n",
        "# Peform analysis of variance on fitted linear model\n",
        "anova_results = anova_lm(model)\n",
        "\n",
        "print('\\nANOVA results')\n",
        "print(anova_results)\n",
        "\n",
        "plt.show()"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "                            OLS Regression Results                            \n",
            "==============================================================================\n",
            "Dep. Variable:                  Close   R-squared:                       1.000\n",
            "Model:                            OLS   Adj. R-squared:                  1.000\n",
            "Method:                 Least Squares   F-statistic:                 8.718e+05\n",
            "Date:                Wed, 21 Aug 2019   Prob (F-statistic):               0.00\n",
            "Time:                        08:34:07   Log-Likelihood:                 998.51\n",
            "No. Observations:                1172   AIC:                            -1989.\n",
            "Df Residuals:                    1168   BIC:                            -1969.\n",
            "Df Model:                           3                                         \n",
            "Covariance Type:            nonrobust                                         \n",
            "==============================================================================\n",
            "                 coef    std err          t      P>|t|      [0.025      0.975]\n",
            "------------------------------------------------------------------------------\n",
            "Intercept     -0.0037      0.005     -0.694      0.488      -0.014       0.007\n",
            "Open          -0.5386      0.022    -24.476      0.000      -0.582      -0.495\n",
            "High           0.7382      0.020     37.008      0.000       0.699       0.777\n",
            "Low            0.8023      0.021     38.077      0.000       0.761       0.844\n",
            "==============================================================================\n",
            "Omnibus:                      457.087   Durbin-Watson:                   2.125\n",
            "Prob(Omnibus):                  0.000   Jarque-Bera (JB):            18631.652\n",
            "Skew:                          -1.081   Prob(JB):                         0.00\n",
            "Kurtosis:                      22.413   Cond. No.                         133.\n",
            "==============================================================================\n",
            "\n",
            "Warnings:\n",
            "[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.\n",
            "\n",
            "Retrieving manually the parameter estimates:\n",
            "[-0.00366994 -0.53855172  0.73822241  0.80231509]\n",
            "\n",
            "ANOVA results\n",
            "              df        sum_sq       mean_sq             F         PR(>F)\n",
            "Open         1.0  27907.222039  27907.222039  2.610469e+06   0.000000e+00\n",
            "High         1.0     36.827092     36.827092  3.444843e+03   0.000000e+00\n",
            "Low          1.0     15.499451     15.499451  1.449834e+03  6.376451e-207\n",
            "Residual  1168.0     12.486505      0.010691           NaN            NaN\n"
          ]
        }
      ],
      "execution_count": 14,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "model.rsquared"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 15,
          "data": {
            "text/plain": [
              "0.99955360755490297"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 15,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from sklearn.metrics import explained_variance_score, mean_absolute_error, mean_squared_error, r2_score\n",
        "ex_var_score = explained_variance_score(Y_test, y_pred)\n",
        "m_absolute_error = mean_absolute_error(Y_test, y_pred)\n",
        "m_squared_error = mean_squared_error(Y_test, y_pred)\n",
        "r_2_score = r2_score(Y_test, y_pred)\n",
        "\n",
        "print(\"Explained Variance Score: \"+str(ex_var_score))\n",
        "print(\"Mean Absolute Error \"+str(m_absolute_error))\n",
        "print(\"Mean Squared Error \"+str(m_squared_error))\n",
        "print(\"R Squared Error \"+str(r_2_score))"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Explained Variance Score: -0.0184926564206\n",
            "Mean Absolute Error 3.15829141594\n",
            "Mean Squared Error 33.2780801426\n",
            "R Squared Error -0.454451340198\n"
          ]
        }
      ],
      "execution_count": 16,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "msk = np.random.rand(len(dataset)) < 0.8\n",
        "train = dataset[msk]\n",
        "test = dataset[~msk]\n",
        "\n",
        "regr = LinearRegression()\n",
        "x = np.asanyarray(train[['Open','High','Low','Volume']])\n",
        "y = np.asanyarray(train[['Adj Close']])\n",
        "regr.fit (x, y)\n",
        "print ('Coefficients: ', regr.coef_)\n",
        "y_= regr.predict(test[['Open','High','Low','Volume']])\n",
        "x = np.asanyarray(test[['Open','High','Low','Volume']])\n",
        "y = np.asanyarray(test[['Adj Close']])\n",
        "print(\"Residual sum of squares: %.2f\"% np.mean((y_ - y) ** 2))\n",
        "print('Variance score: %.2f' % regr.score(x, y))"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Coefficients:  [[ -4.91601198e-01   7.66890389e-01   7.27064720e-01  -5.52148661e-10]]\n",
            "Residual sum of squares: 0.01\n",
            "Variance score: 1.00\n"
          ]
        }
      ],
      "execution_count": 17,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    }
  ],
  "metadata": {
    "kernel_info": {
      "name": "python3"
    },
    "language_info": {
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "name": "python",
      "codemirror_mode": {
        "version": 3,
        "name": "ipython"
      },
      "version": "3.5.5",
      "mimetype": "text/x-python",
      "file_extension": ".py"
    },
    "kernelspec": {
      "name": "python3",
      "language": "python",
      "display_name": "Python 3"
    },
    "nteract": {
      "version": "0.15.0"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 4
}